import { defineStore } from 'pinia'

export const useClassStore = defineStore('class', {
  state: () => ({
    initialClassId: null as number | null,
    refresh: false as boolean,
  }),
  actions: {
    setInitialClassId(classId: number): void {
      this.initialClassId = classId
    },
    clearInitialClassId(): void {
      this.initialClassId = null
    },
    setRefresh(refresh: boolean): void {
      this.refresh = refresh
    },
  },
})
